﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace PNProject.Core
{
    public interface IRepository<T>
    {
        IEnumerable<T> GetAll();

        IEnumerable<T> GetAll(string sortField);

        IEnumerable<T> GetSome(Expression<Func<T, bool>> predicate);

        IEnumerable<T> GetSome(Expression<Func<T, bool>> predicate, int top, int skip);

        T GetOne(Expression<Func<T, bool>> predicate);

        void Save(T original, T modified);

        void Delete(T original);
    }
}
